<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<title>Document</title>
		<style>
			div {
				width: 200px;
				height: 200px;
				background-color: rgb(224, 20, 20);
			}
		</style>
	</head>
	<body>
		<div></div>

		<script>
			function getRandom(m, n) {
				return Math.floor(Math.random() * (n - m)) + m
			}
			var r = getRandom(0, 255)
			var g = getRandom(0, 255)
			var b = getRandom(0, 255)
			var str = 'rgb(' + r + ',' + g + ',' + b + ')'
			console.log('str ', str)

			const divEle = document.querySelector('div')
			divEle.style.backgroundColor = str

		</script>
	</body>
</html>
